package com.cskaoyan.market.controller.wx;

import com.cskaoyan.market.service.wx.WxCatalogService;
import com.cskaoyan.market.util.ResponseUtil;
import com.cskaoyan.market.vo.CatalogCurrentVo;
import com.cskaoyan.market.vo.CatalogIndexVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/wx/catalog")
public class WxCatalogController {
    @Autowired
    WxCatalogService catalogService;

    @GetMapping("current")
    public Object current(Integer id){
        CatalogCurrentVo data=catalogService.current(id);
        return ResponseUtil.ok(data);
    }

    @GetMapping("index")
    public Object index(){
        CatalogIndexVo data=catalogService.index();
        return ResponseUtil.ok(data);
    }
}

